package com.fzj.example.interface_reference;

/**
 * ClassName: Test
 * date: 2019/10/22 15:09
 * Description: TODO
 *
 * @author fanzj@bonree.com
 * @since JDK 1.8
 */
public class Test {
    public static void main(String[] args) throws ClassNotFoundException, IllegalAccessException, InstantiationException {
        System.out.println(Entity.class.getClassLoader().loadClass("com.fzj.example.interface_reference.Entity"));
        System.out.println(Entity.class);
        Class clz=Class.forName("com.fzj.example.interface_reference.Entity");
        System.out.println(clz);
        //Entity entity= (Entity) clz.newInstance();
        Entity.class.newInstance();
        System.out.println(Entity.class.getClassLoader());
        System.out.println(Entity.class.getClassLoader().getParent());
        System.out.println(Entity.class.getClassLoader().getParent().getParent());
        System.out.println(clz.newInstance());

    }
}
